import java.util.Scanner;

public class Main {
    public static int func(int N){
        int count = 0;
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < N; j++) {
                count++;
            }
        }
        for (int k = 0; k < 2*N; k++) {
            count++;
        }
        int M = 10;
        while((M--)>0){
            count++;
        }
        return count;
    }

    public static void main(String[] args) {
        Scanner num = new Scanner(System.in);
        int b = num.nextInt();
        int a = func(b);
        System.out.println(a);
    }
}
